<template>
  <div class="diagram-container">
    <bpmn-modeler ref="bpmref"
      :url="dataForm.url"
      v-on:error="handleError"
      v-on:shown="handleShown"
    ></bpmn-modeler>
  </div>
</template>

<script>
  import BpmnModeler from '@/components/bpmnComponents/bpm-modeler.vue'
  export default {
    data () {
      return {
        dataForm: {
          url: 'loanApproval.bpmn'
        }
      }
    },
    components: {
      BpmnModeler
    },
    methods: {
      handleError: function (err) {
        console.error('failed to show diagram', err)
      },
      handleShown: function () {
        console.log('diagram shown')
      }
    },
    activated () {
    }
  }
</script>

<style>
  .diagram-container{
    position: relative;
    width: 100%;
    height: 100%;
  }
</style>
